<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button id="btn">你好</button>
<script>
var btn = document.getElementById("btn");
btn.addEventListener("click", function (){
    console.log("click 2");
});
btn.addEventListener("click", function (){
    console.log("click 1");
}, true);  // 参数3:表示是否在捕获阶段触发
btn.onclick = function (){
    console.log("dom0 click");
}
</script>
</body>
</html>